
import request from "@/utils/request";
import { IDictionaries, IDictionariesItem, SMSCodeRequest } from "./type";

/**获取验证码 */
export function fetchCode(options: SMSCodeRequest) {
  return request.get<number>('/admin/mobile/get-smsCode', options)
}

/**文件上传 */
export function fetchUpload(file: string) {

  return request.upload('/admin/sys-file/upload', { filePath: file })
}

/** 根据字典类型获取字典项 */
export function fetchDictionariesItem(type: IDictionaries) {
  return request.get<IDictionariesItem[]>(`/admin/dict/type/${type}`)
}